home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 2 / ETO Development Tools 2.iso / Essentials / Developer Essentials Nov 90 / Apple II / Apple.II.partition / Tools / DTS.Samples / SC17Darts / Darts.p / UGlobals.p < prev    next >
Encoding:
Text File  |  1990-06-25  |  2.4 KB  |  105 lines  |  [TEXT/pdos]

  1. {**********************************************************************
  2. {*
  3. {*
  4. {* Darts Globals -- Version 3.0  (interface)
  5. {*
  6. {* Copyright (c)
  7. {* Apple Computer, Inc.  1986-1989
  8. {* All Rights Reserved.
  9. {*
  10. {* Developer Technical Support Apple II Sample Code
  11. {*
  12. {* This file contains the global variables used by the 
  13. {* program.
  14. {*
  15. {**********************************************************************}
  16. UNIT uGlobals;
  17.  
  18. INTERFACE
  19.  
  20. USES    
  21.  
  22.         types,
  23.         locator,
  24.         memory,
  25.         quickdraw,
  26.         intMath,
  27.         events,
  28.         controls,
  29.         windows,
  30.         dialogs,
  31.         STDFile,
  32.         lists;
  33.  
  34. const
  35.  
  36.     AppleMenuID             = $1100;
  37.         AboutItem           = $1101;
  38.     FileMenuID              = $1200;
  39.         NewItem             = $1202;
  40.         QuitItem            = $1203;
  41.     EditMenuID              = $1300;
  42.         UndoItem            = 250;    {For DA's}
  43.         CutItem             = 251;    {For DA's}
  44.         CopyItem            = 252;    {For DA's}
  45.         PasteItem           = 253;    {For DA's}
  46.         ClearItem           = 254;    {For DA's}
  47.     GameMenuID              = $1400;
  48.         RobinGameItem       = $1401;
  49.         CrickettGameItem    = $1402;
  50.            
  51.     NumPlayers = 2;
  52.     Player1 = 1;
  53.     Player2 = 2;
  54.  
  55.     RobinWindow     = $1000;
  56.     CrickettWindow  = $1001;
  57.  
  58.     ConfirmTextID   = 2;
  59.     
  60. type
  61.  
  62.     theMemRecHndl = ^theMemRecPtr;
  63.     theMemRecPtr = ^theMemRec;
  64.     theMemRec = PACKED RECORD
  65.         memPtr : Ptr; { Pointer to string, or custom }
  66.         memFlag : integer; { Bit Flag }
  67.     end;
  68.     
  69.     ListArrayHandle = ^ListArrayPtr;
  70.     ListArrayPtr = ^ListArray;
  71.     ListArray = packed array [0..0] of theMemRec;       
  72.     
  73. var
  74.     crickettTables  : array[1..NumPlayers,1..26] of integer;
  75.     score           : array[1..NumPlayers] of integer;
  76.     listEntries     : array[1..NumPlayers] of integer;
  77.  
  78.     userID, 
  79.     gameType        : integer;
  80.     
  81.     weHaveAWinner, 
  82.     quitFlag, 
  83.     firstUpdateComplete : boolean; 
  84.  
  85.  
  86.     scoreList       : array[1..NumPlayers] of ListArrayHandle;
  87.     event           : WmTaskRec;
  88.     theWindow       : GrafPortPtr;
  89.  
  90.     scoreStrings    : array[1..NumPlayers] of Str255;
  91.     scoreStringArray : array[0..1] of StringPtr;
  92.  
  93.     blankStr,
  94.     oneStr,
  95.     twoStr,
  96.     threeStr        : string[1];
  97.        
  98. procedure InitGlobals;                                     {Setup variables}
  99.  
  100. IMPLEMENTATION
  101.  
  102. {$i uGlobals.inc.p}
  103.  
  104. END.
  105.